import request from '@/utils/request'

// 查询项目类型列表
export function listGranttype(query) {
  return request({
    url: '/grant/granttype/list',
    method: 'get',
    params: query
  })
}

// 查询项目类型详细
export function getGranttype(id) {
  return request({
    url: '/grant/granttype/' + id,
    method: 'get'
  })
}

// 新增项目类型
export function addGranttype(data) {
  return request({
    url: '/grant/granttype',
    method: 'post',
    data: data
  })
}

// 修改项目类型
export function updateGranttype(data) {
  return request({
    url: '/grant/granttype',
    method: 'put',
    data: data
  })
}

// 删除项目类型
export function delGranttype(id) {
  return request({
    url: '/grant/granttype/' + id,
    method: 'delete'
  })
}

// 导出项目类型
export function exportGranttype(query) {
  return request({
    url: '/grant/granttype/export',
    method: 'get',
    params: query
  })
}